package com.southminority.ethnic.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.southminority.ethnic.column.ExcelColumn;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 学术论文实体类
 * 对应数据库表：paper
 * 
 * @author SouthMinority
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("paper")
public class Paper implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 论文ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelColumn(name = "论文ID", columnWidth = 10, value = "1", hidden = true)
    private Long id;

    /**
     * 论文标题
     */
    @ExcelColumn(name = "论文标题", columnWidth = 30, nonNull = true, value = "示例论文标题")
    private String title;

    /**
     * 作者（多个作者用逗号分隔）
     */
    @ExcelColumn(name = "作者(逗号分隔)", columnWidth = 30, nonNull = true, value = "张三,李四")
    private String authors;

    /**
     * 期刊名称/会议名称
     */
    @ExcelColumn(name = "期刊/会议", columnWidth = 25, value = "Journal A")
    private String journal;

    /**
     * 发表年份
     */
    @ExcelColumn(name = "发表年份", columnWidth = 12, value = "2024")
    private Integer publicationYear;

    /**
     * 卷号
     */
    @ExcelColumn(name = "卷号", columnWidth = 10, value = "12")
    private String volume;

    /**
     * 期号
     */
    @ExcelColumn(name = "期号", columnWidth = 10, value = "3")
    private String issue;

    /**
     * 页码
     */
    @ExcelColumn(name = "页码", columnWidth = 12, value = "1-10")
    private String pages;

    /**
     * DOI标识
     */
    @ExcelColumn(name = "DOI", columnWidth = 22, value = "10.1000/xyz123")
    private String doi;

    /**
     * 摘要
     */
    @TableField("abstract")
    @ExcelColumn(name = "摘要", columnWidth = 40, value = "摘要示例")
    private String abstractText;

    /**
     * 关键词
     */
    @ExcelColumn(name = "关键词", columnWidth = 20, value = "民族;语言")
    private String keywords;

    /**
     * PDF文件URL
     */
    @ExcelColumn(name = "PDF URL", columnWidth = 40, value = "https://example.com/paper.pdf")
    private String pdfUrl;

    /**
     * 代码链接URL
     */
    @ExcelColumn(name = "代码URL", columnWidth = 40, value = "https://github.com/example/repo")
    private String codeUrl;

    /**
     * 分类
     */
    @ExcelColumn(name = "分类", columnWidth = 15, value = "期刊论文")
    private String category;

    /**
     * 论文类型：期刊论文、会议论文、专著、其他
     */
    @ExcelColumn(name = "论文类型", columnWidth = 15, value = "journal")
    private String paperType;

    /**
     * 语言类型
     */
    @ExcelColumn(name = "语言类型", columnWidth = 12, value = "中文")
    private String languageType;

    /**
     * 引用次数
     */
    @ExcelColumn(name = "引用次数", columnWidth = 10, value = "0")
    private Integer citationCount;

    /**
     * 下载次数
     */
    @ExcelColumn(name = "下载次数", columnWidth = 10, value = "0")
    private Integer downloadCount;

    /**
     * 状态：1-已发布，0-草稿，-1-已删除
     */
    @ExcelColumn(name = "状态(1发布/0草稿)", columnWidth = 15, value = "1", hidden = true)
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelColumn(name = "创建时间", columnWidth = 25, hidden = true)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelColumn(name = "更新时间", columnWidth = 25, hidden = true)
    private LocalDateTime updateTime;
} 
